
<div class="panel panel-default" ng-if="type=='show'">
	<div class="panel-heading">
		<h3 class="panel-title">在线代码评审</h3>
	</div>
	<div class="panel-body">
		<table class="table table-bordered table-hover">
			<tbody>
				<tr>
					<td>代码评审：</td>
					<td>{{branchCfgInfo.codereviewOpen|codereviewFilter }}</td>
				</tr>
			</tbody>
		</table>
		<table class="table table-bordered table-hover"
			ng-if="branchCfgInfo.codereviewOpen=='1'">
			<tbody>

				<tr>
					<th>代码评审人</th>
					<th>开发人员</th>
				</tr>
				<tr
					ng-repeat="reviewerAndDevelopers in reviewerAndDevelopersBoList ">
					<td>{{reviewerAndDevelopers.reviewer.fullName}}</td>
					<td>
						<div>
								<span
									ng-repeat="developer in reviewerAndDevelopers.developers"
									ng-if="developer.checked">
									{{developer.fullName}}&nbsp;&nbsp;</span>
						</div>
					</td>
				</tr>
			</tbody>
		</table>
		<div class="form-group pull-right">
		<button class="btn btn-default" ng-click="editCodeView();" ng-if="!isVersionFreezen && isVersionActive && hasPermissionMap['7020'] !=null && hasPermissionMap['7020']">修改</button>
	</div>
	</div>
	
</div>


<div class="panel panel-default" ng-if="type=='edit'">
	<div class="panel-heading">
		<h3 class="panel-title">在线代码评审设置</h3>
	</div>
	<div class="panel-body">
		<form name="reviewBoardForm" class="form-horizontal">
			<div class="form-group">
				<label class="col-sm-2 control-label" for="formGroupInputSmall"
					style="width: 30%">使用ReviewBoard评审：</label>
				<div class="col-sm-6">
					<label class="radio-inline"> <input type="radio"
						name="codereviewOpen" value="0" ng-model="postData.codereviewOpen">
						不使用
					</label> <label class="radio-inline"> <input type="radio"
						name="codereviewOpen" value="1" ng-model="postData.codereviewOpen">
						使用
					</label>
				</div>
			</div>

			<!-- >代码评审人及开发人员对应列表 -->

			<table class="table table-bordered table-hover"
				ng-if="postData.codereviewOpen=='1'">
				<tbody>
					<tr>
						<th width="20%" align="center">代码评审人</th>
						<th width="70%" align="center">开发人员</th>
						<th width="10%" align="center">操作</th>
					</tr>
					<tr ng-repeat="reviewerAndDevelopers in reviewerAndDevelopersBoList ">
						<td>
<!-- 						<input -->
<!-- 							type="text" class="form-control" placeholder="代码评审人" -->
<!-- 							ng-model="reviewerAndDevelopers.reviewer.fullName" required /> -->
							
							<div class="log-user-select">
								<input type="input" class="form-control" id="user" required="required" autocomplete="off"  disableautocomplete
									ng-model="reviewerAndDevelopers.reviewer.fullName" data-toggle="dropdown"
									aria-haspopup="true" aria-expanded="true"
									ng-change="queryByUser($index)" placeholder="代码评审人"
									ng-blur="getUser($index)"> <span
									class="glyphicon glyphicon-chevron-down form-control-feedback"
									style="display: none;" aria-hidden="true"></span>
								<ul class="dropdown-menu" aria-labelledby="user"
									style="overflow: hidden;">
									<li
										ng-repeat="user in userList|filterEmpty:reviewerAndDevelopers.reviewer.fullName|filter:reviewerAndDevelopers.reviewer.fullName|numberLimit:20">
										<a href="" ng-mousedown="selectUser(user,$parent.$index)"
										sn-tooltip='{{user}}' ng-show="user.length > 35">{{user.substring(0,35)+'...'}}</a>
										<a href="" ng-mousedown="selectUser(user,$parent.$index)"
										ng-show="user.length <= 35">{{user}}</a>
									</li>
									<li></li>
								</ul>
							</div>
							
						</td>
						<td>
							<div>
								<label class="checkbox-inline"
									ng-repeat="developer in reviewerAndDevelopers.newDevelopers"> <input
									type="checkbox" ng-model="developer.checked">
									{{developer.fullName}}
								</label>
							</div>
						</td>
						<td><a href="javascript:void(0)" ng-click="add();"
							ng-if="$index == 0">增加</a> <a href="javascript:void(0)"
							ng-click="del($index)" ng-if="$index > 0">删除</a></td>
					</tr>
				</tbody>
			</table>
			<div class="form-group">
			<div class="col-sm-offset-2 col-sm-10">
				<span id="reviewtips" style="color:red">{{errorMsg}}</span></div>
			</div>

			<div class="form-group">
				
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-default"
						ng-click="saveReviewBoard(reviewBoardForm.$invalid);" ng-if="isVersionActive&&hasPermissionMap['7020'] !=null && hasPermissionMap['7020']">确定</button>
					<button class="btn btn-default" ng-click="exitEdit();" ng-if="isVersionActive&&hasPermissionMap['7020'] !=null && hasPermissionMap['7020']">返回</button>
				</div>
			</div>
		</form>
	</div>
</div>